import { dateFormat } from '@/util/date';
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
let now = new Date();
now.setDate(now.getDate() + 1);
export const endDate = dateFormat(now, 'yyyy-MM-dd');
export const tableOption = {
  border: true,
  index: true,
  indexLabel: '序号',
  stripe: true,
  menuAlign: 'center',
  align: 'center',
  editBtn: false,
  delBtn: false,
  addBtn: false,
  viewBtn: true,
  menu: false,
  selection: true,
  selectable: row => row.checkStatus == '0',
  column: [{
    label: '标识',
    prop: 'id',
    hide: true,
    display: false
  }, {
    label: '线路名称',
    prop: 'lineCode',
    type: 'select',
    search: true,
    cascaderItem: ["stationCode"],
    props: {
      label: 'name',
      value: 'code'
    },
    dicUrl: "/support/swparamline/dict"
  }, {
    label: '车站名称',
    prop: 'stationCode',
    type: 'select',
    search: true,
    props: {
    	label: 'name',
    	value: 'code'
    },
    dicFlag: false,
    dicUrl: "/support/swparamstation/dict/{{key}}"
  }, {
    label: '申请人',
    prop: 'applyPersonName'
  }, {
    label: '申请原因',
    prop: 'applyReason'
  }, {
    label: '申请时间',
    prop: 'applyTime',
    type: 'datetime',
    format: 'yyyy-MM-dd',
    valueFormat: 'yyyy-MM-dd',
    search: true,
    searchValue: [startDate, endDate],
    searchSpan: 12,
    searchRange: true
  }, {
    label: '审核状态',
    prop: 'checkStatus',
    type: 'select',
    dicUrl: '/admin/dict/type/audit_status',
    rules: [{
      required: true,
      message: '请选择审核状态',
      trigger: 'blur'
    }]
  }, {
    label: '审核时间',
    prop: 'checkTime',
    hide: true,
    addDisplay: false,
    editDisplay: false
  }, {
    label: '审核人',
    prop: 'checkPersonId',
    hide: true,
    addDisplay: false,
    editDisplay: false
  }, {
    label: '备注',
    prop: 'remark',
    span: 24,
    type: 'textarea',
    maxRows:6,
    minRows:4
  }]
};
